package com.sudingke.service.api;

import java.util.HashMap;
import java.util.Map;

public class WaimaiListParam {
    public int zoneId = 0;
    public int subZoneId = 0;
    public int status = 0;
    public int catId = 0;
    public int page = 1;
    public String query = "";

    public Map<String, String> toParamMap() {
	Map<String, String> paramMap = new HashMap<String, String>();
	if (zoneId > 0)
	    paramMap.put("a", String.valueOf(zoneId));
	if (subZoneId > 0)
	    paramMap.put("b", String.valueOf(subZoneId));
	if (catId > 0)
	    paramMap.put("c", String.valueOf(catId));
	if (query != "")
	    paramMap.put("q", query);
	if (page == 0)
	    page = 1;
	paramMap.put("p", String.valueOf(page));
	return paramMap;
    }
}
